home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 6 / 006.d81 / baseball adv (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  25KB  |  908 lines

  1. 1 rem *** baseball adventure by
  2. 2 rem *** samual chiang
  3. 3 rem *** translated for the 64 by
  4. 4 rem *** donna k. woody
  5. 5 poke53280,5:poke53281,1:printchr$(144):poke53272,23:printchr$(8)
  6. 10 gosub2040:goto270
  7. 12 :
  8. 13 rem *** room descriptions ***
  9. 14 :
  10. 20 onagoto30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180
  11. 22 zz=a-16:onzzgoto190,200,210,220,230,240,250,260
  12. 30 print" in the parking lot.":n=2:goto340
  13. 40 print" outside of [195]andlestick [208]ark.     [212]here is a sign over the entrance."
  14. 42 n=6:s=1:goto340
  15. 50 print" in your office.":n=5:goto340
  16. 60 print" in a very long hallway.  [212]here   are stairs going down."
  17. 65 e=5:d=17:goto340
  18. 70 print" in the west end of an outer e/w  hallway."
  19. 75 n=10:w=4:e=6:s=3:goto340
  20. 80 print" in the east end of an outer e/w  hallway."
  21. 85 n=11:w=5:e=7:s=2:goto340
  22. 90 print" in an extremely long hallway.    [212]here are stairs going up."
  23. 95 w=6:u=14:goto340
  24. 100 print" in the stands. + section 26 +"
  25. 105 s=9:goto340
  26. 110 print" in the stands. + section 12 +"
  27. 115 s=10:n=8:goto340
  28. 120 print" in the stands. + section  6 +"
  29. 125 s=5:e=11:n=9:goto340
  30. 130 print" in the stands. + section  9 +"
  31. 135 s=6:n=12:w=10:goto340
  32. 140 print" in the stands. + section 15 +"
  33. 145 s=11:n=13:goto340
  34. 150 print" in the stands. + section 27 +"
  35. 155 s=12:goto340
  36. 160 print"[160]in a second level hallway.       [212]here are stairs going down."
  37. 165 s=24:e=16:w=15:d=7:goto340
  38. 170 print" in an office.  [212]here is a sign   above an officious looking girl."
  39. 175 e=14:goto340
  40. 180 print" in the [208]ress [194]ox.  [217]ou see a     famous sportscaster."
  41. 185 w=14:goto340
  42. 190 print" in a lower level hallway.  [212]here are stairs going up."
  43. 195 n=20:w=19:e=18:u=4:goto340
  44. 200 print"[160]in the clubhouse.":w=17:goto340
  45. 210 print"[160]in the locker room.":e=17:goto340
  46. 220 print" in the [199]iants' dugout.  [217]ou see  the manager."
  47. 225 s=17:n=21:goto340
  48. 230 print"[160]behind the plate, next to the"
  49. 232 print"backstop.  [212]he [199]iants' dugout is south,"
  50. 234 print"the field is west, and the [196]odgers'     dugout is north of you."
  51. 236 n=22:w=23:s=20:goto340
  52. 240 print"[160]in the [196]odgers' dugout.":s=21:goto340
  53. 250 print"[160]in the batters' box.":e=21:goto340
  54. 260 print"[160]in the scoreboard control room.  [217]ou see a button on a control panel."
  55. 265 n=14:goto340
  56. 266 :
  57. 267 rem *** dim variables, initialize ***
  58. 268 :
  59. 270 dima$(58),a(58),b(12),b$(35),c$(10),d(35),h$(58),i(58),pl$(5),ev$(5),dg$(5)
  60. 290 fora=1to20:reada$(a),a(a):h$(a)=a$(a):next
  61. 292 fora=1to35:readb$(a):next:fora=13to35:readd(a):next
  62. 300 forv=1to5:readpl$(v):readev$(v):readdg$(v):nextv
  63. 310 a=3:pt=0:cl=0:hb=0:bt=0:cp=0:tk=0:fb=0:ch=0:jr=0:ca=0:ft=0:wj=0:wc=0:wp=0
  64. 312 ck=0:my=0:wl=0
  65. 320 n=0:w=0:s=0:e=0:u=0:d=0:printchr$(147):print"[217]ou're";
  66. 330 goto20
  67. 335 :
  68. 337 :
  69. 340 forb=1to12:b(b)=0:nextb
  70. 346 :
  71. 347 rem *** directions ***
  72. 348 :
  73. 350 print:print"[197]xits: "
  74. 360 ifwthenprint"[160][215]est";:b(1)=w:b(2)=w
  75. 370 ifnthenprint"[160][206]orth";:b(3)=n:b(4)=n
  76. 380 ifethenprint"[160][197]ast";:b(5)=e:b(6)=e
  77. 390 ifsthenprint"[160][211]outh";:b(7)=s:b(8)=s
  78. 400 ifuthenprint"[160][213]p";:b(9)=u:b(10)=u
  79. 410 ifdthenprint"[160][196]own";:b(11)=d:b(12)=d
  80. 412 :
  81. 413 rem *** if room = 1 & cash is   ***
  82. 414 rem *** there then end game     ***
  83. 415 rem *** message for winner      ***
  84. 416 :
  85. 420 ifa=3andch=1then2240
  86. 422 :
  87. 423 rem *** if room = 23 message    ***
  88. 424 :
  89. 430 print:print:ifa=23thenpoke781,10:poke782,1:sys65520:gosub3000:goto2030
  90. 432 :
  91. 433 rem *** if not wearing uniform  ***
  92. 434 rem *** then message            ***
  93. 435 :
  94. 440 if(wp<>1orwc<>1orwl<>1orwj<>1)anda=21thengosub3050:goto2030
  95. 442 :
  96. 443 rem *** if wearing uniform      ***
  97. 444 rem *** pants, cleates, jersey, ***
  98. 445 rem *** & cap, then message     ***
  99. 446 :
  100. 450 ifwp=1andwj=1andwc=1andwl=1andft=0thengosub3650
  101. 452 :
  102. 453 rem *** check for items at your ***
  103. 454 rem *** location and print them ***
  104. 455 :
  105. 460 forb=1to20:ifa=abs(a(b))thenc=c+1:goto480
  106. 470 nextb:print:goto500
  107. 480 ifc<2thenprint"[212]hings you see here:"
  108. 490 print"[160]"a$(b):goto470
  109. 492 :
  110. 493 rem *** increment time & check  ***
  111. 494 rem *** to see if innings have  ***
  112. 495 rem *** passed to complete game ***
  113. 496 :
  114. 500 xx=xx+1
  115. 510 ifxx/13=int(xx/13)thengosub3100
  116. 520 ifxx>=125then2300
  117. 526 :
  118. 527 rem *** get command ***
  119. 528 :
  120. 530 v=fre(0):c=0:print:input"[195]ommand";a$
  121. 535 ifa$="buy coke"thena$="give money"
  122. 540 ifa$="look"then320
  123. 544 :
  124. 545 rem *** check for valid         ***
  125. 546 rem *** command - check for     ***
  126. 547 rem *** direction first         ***
  127. 549 :
  128. 550 print:forb=1to12:ifa$=b$(b)then570
  129. 560 next:goto590
  130. 570 ifb(b)<>0thena=b(b):goto320
  131. 574 :
  132. 575 rem *** not valid direction ***
  133. 576 :
  134. 580 print"[217]ou can't go that way!":goto530
  135. 586 :
  136. 587 rem *** inventory command ***
  137. 588 :
  138. 590 ifa$<>"i"andright$(a$,3)<>"ory"then620
  139. 600 print"[217]ou are carrying:":fork=1to10:printc$(k);"   ";:ifpos(0)>19thenprint
  140. 610 next:goto530
  141. 612 :
  142. 613 rem *** not direction or        ***
  143. 614 rem *** or inventory command    ***
  144. 615 rem *** check for valid verb    ***
  145. 620 forb=13to35:f=len(b$(b)):ifleft$(a$,f)=b$(b)then640
  146. 625 :
  147. 626 rem *** not valid verb ***
  148. 627 :
  149. 630 next:print"[196]on't know what "chr$(34);a$;chr$(34);" means.":goto530
  150. 635 :
  151. 636 rem *** valid command verb ***
  152. 637 rem *** find last 3 letters ***
  153. 638 rem *** of noun             ***
  154. 639 :
  155. 640 d$=mid$(a$,len(b$(b))+2):e$=right$(d$,3)
  156. 643 :
  157. 644 rem *** d(b) holds code for ***
  158. 645 rem *** synonym verbs       ***
  159. 646 rem *** check for verb #    ***
  160. 647 rem *** & take action       ***
  161. 648 :
  162. 650 ifd(b)<>1then850
  163. 655 :
  164. 656 rem *** get item                ***
  165. 657 :
  166. 660 forj=1to20:ife$=right$(a$(j),3)anda=abs(a(j))then680
  167. 665 :
  168. 666 rem *** doesn't recognize noun ***
  169. 667 rem *** from list              ***
  170. 668 :
  171. 670 next:print"[201] see no "d$" here.":goto500
  172. 675 :
  173. 676 rem *** if a(j) is negative #  ***
  174. 677 rem *** then you can't get noun***
  175. 678 :
  176. 680 ifa(j)<0thenprint"[217]ou can't get that!":goto500
  177. 685 :
  178. 686 rem *** get item               ***
  179. 687 :
  180. 690 ifr<11thengosub3150:goto720
  181. 695 :
  182. 696 rem *** you're carrying too     ***
  183. 697 rem *** too many items          ***
  184. 698 :
  185. 700 print"[217]ou're carrying too much.  [217]ou should   drop something first."
  186. 705 :
  187. 706 rem *** goto drop section       ***
  188. 707 :
  189. 710 goto500
  190. 715 :
  191. 716 rem *** set variable to 1 if   ***
  192. 717 rem *** last 3 letters of noun ***
  193. 718 rem *** match item picked up   ***
  194. 719 :
  195. 720 ife$="nts"thenpt=1
  196. 730 ife$="tes"thencl=1
  197. 740 ife$="bat"thenhb=1
  198. 750 ife$="all"thenbt=1
  199. 760 ife$="pon"thencp=1
  200. 770 ife$="ket"thentk=1
  201. 780 ife$="bee"thenfb=1
  202. 790 ife$="ash"thench=1
  203. 800 ife$="sey"thenjr=1
  204. 810 ife$="cap"thenca=1
  205. 820 ife$="oke"thenck=1
  206. 830 ife$="ney"thenmy=1
  207. 835 :
  208. 836 rem *** goto delay loop        ***
  209. 837 :
  210. 840 goto2010
  211. 845 :
  212. 846 rem *** drop command            ***
  213. 847 :
  214. 850 ifd(b)<>2then1050
  215. 855 :
  216. 856 rem *** find out if item is    ***
  217. 857 rem *** being carried          ***
  218. 858 :
  219. 860 forj=1to10:ife$=right$(c$(j),3)then880
  220. 865 :
  221. 868 rem *** you don't have the item ***
  222. 869 :
  223. 870 next:print"[217]ou're not carrying it.":goto500
  224. 872 :
  225. 873 rem *** put item back in noun  ***
  226. 874 rem *** list - remove from     ***
  227. 875 rem *** carry list - decrement ***
  228. 876 rem *** # of items being       ***
  229. 877 rem *** carried                ***
  230. 878 :
  231. 880 fork=1to58:ifa$(k)=""thena$(k)=c$(j):a(k)=a:h(j)=0:goto900
  232. 890 next
  233. 900 print"[207][203]!":fork1=1to58:ifc$(j)=h$(k1)thenc$(j)="":r=r-1:goto920
  234. 910 next
  235. 912 :
  236. 913 rem *** after dropping item    ***
  237. 914 rem *** set variable to 0 if   ***
  238. 915 rem *** last 3 letters of noun ***
  239. 916 rem *** match                  ***
  240. 917 :
  241. 920 ife$="all"thenbt=0
  242. 930 ife$="bat"thenhb=0
  243. 940 ife$="pon"thencp=0
  244. 950 ife$="ket"thentk=0
  245. 960 ife$="bee"thenfb=0
  246. 970 ife$="ash"thench=0
  247. 980 ife$="nts"thenpt=0:wp=0:ft=0
  248. 990 ife$="tes"thencl=0:wl=0:ft=0
  249. 1000 ife$="sey"thenjr=0:wj=0:ft=0
  250. 1010 ife$="cap"thenca=0:wc=0:ft=0
  251. 1020 ife$="oke"thenck=0
  252. 1030 ife$="ney"thenmy=0
  253. 1032 :
  254. 1033 rem *** goto delay loop      ***
  255. 1034 :
  256. 1040 goto2010
  257. 1042 :
  258. 1043 rem *** look/read command    ***
  259. 1044 :
  260. 1050 ifd(b)<>3then1110
  261. 1052 :
  262. 1053 rem *** if room = 2 & noun =  ***
  263. 1054 rem *** sign then read        ***
  264. 1055 :
  265. 1060 ifa=2ande$="ign"thengosub3200:goto2020
  266. 1065 :
  267. 1066 rem *** if room = 15 & noun = ***
  268. 1067 rem *** sign